<template>
  <!-- <div :class="{red : age>18}"></div> -->
   <div :class="arr">
  你好世界
<button @click="arr.push('mid')">点我</button>
</div>
  
</template>

<script>
export default {
  

  data() {
    return {
      age :18,
      arr : ['red','老二','老三'],
      
    };
  },
  methods: {
    
  },
};
</script>

<style>
div {
  width: 100px;
  height: 100px;
  background-color: #f0f;
}

</style>